package com.fujitsu.cn.fnst.velocity.tool;

import java.util.Date;

import org.apache.velocity.tools.config.DefaultKey;
import org.apache.velocity.tools.generic.SafeConfig;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.context.annotation.DependsOn;
import org.springframework.context.annotation.Scope;

import com.fujitsu.cn.fnst.base.DateUtils;
import com.fujitsu.cn.fnst.entiy.MeetingUse;
import com.fujitsu.cn.fnst.service.MeetingUseService;

@Configurable("meetingUseTool")
@DefaultKey("meetingUseTool")
@Scope
@DependsOn
public class MeetingUseTool extends SafeConfig {
    private MeetingUseService MeetingUseService;

    public MeetingUse getMeetingUse(int meetingId, String date) {
        Date day=DateUtils.parseDate(date);
        return MeetingUseService.getMeetingUse(meetingId, day);

    }

    public MeetingUseService getMeetingUseService() {
        return MeetingUseService;
    }

    public void setMeetingUseService(MeetingUseService meetingUseService) {
        MeetingUseService = meetingUseService;
    }


}
